<?php if(!defined('IN_APP')) exit('Access Denied');?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
	<meta charset="UTF-8">
	<title>商城</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
	<meta name="format-detection" content="telephone=no,email=no,adress=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />  
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="<?php echo THEME_PATH;?>styles/swiper.min.css">
	<link rel="stylesheet" href="<?php echo THEME_PATH;?>styles/reset.css">
	<link rel="stylesheet" href="<?php echo THEME_PATH;?>styles/common.css">
	<link rel="stylesheet" href="<?php echo THEME_PATH;?>styles/style.css">	
</head>
<body>
	<!-- S carousel -->
	<div class="swiper-container store-swiper">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
				<img src="<?php echo THEME_PATH;?>images/banner1.jpg" alt="" class="img-responsive">
            </div>
            <div class="swiper-slide">
				<img src="<?php echo THEME_PATH;?>images/banner1.jpg" alt="" class="img-responsive">
            </div>
        </div>
    </div>
	<!-- E carousel -->
	<div class="flex flex-pack-justify exchange-link-wrap">
		<div>升值链<span class="num"><?php echo round($user_info['upvaluation'],6);?></span>GF</div>
		<a href="/index.php?m=user&c=goods&a=records">
			<img src="<?php echo THEME_PATH;?>images/icon1.png" alt="" class="inline_block icon">
			<span class="black">兑换记录</span>
			<i class="iconfont">&#xe6a0;</i>
		</a>
	</div>

	<!-- S 滑动导航 -->
	<div class="store-nav-wrap">
		<div class="swiper-container nav-slide-swiper">
	        <div class="swiper-wrapper">
	            <div class="swiper-slide cur">
					<a href="<?php echo U('index',array('type'=>2)); ?>">话费充值</a>
	            </div>
	            <div class="swiper-slide">
					<a href="<?php echo U('index',array('type'=>3)); ?>">加油卡充值</a>
	            </div>
	            <div class="swiper-slide">
					<a href="<?php echo U('index',array('type'=>4)); ?>">旅游</a>
	            </div>
	            <div class="swiper-slide">
					<a href="<?php echo U('index',array('type'=>5)); ?>">汽车</a>
	            </div>
	            <div class="swiper-slide">
					<a href="<?php echo U('index',array('type'=>6)); ?>">餐饮</a>
	            </div>
	        </div>
	    </div>
	</div>
	<!-- E 滑动导航 -->
	<!-- S 物品列表 -->
	<div class="store-product-wrap">
		<ul>
			<?php if($goods_info) : ?>
				<?php foreach($goods_info as $key => $value) : ?>
			<li class="flex">
				<div><img src="<?php echo THEME_PATH;?>images/img1.jpg" alt="" width="165" height="100" class="pro-img"></div>
				<div class="flex-1 pro-info">
					<dl>
						<dt class="name"><?php echo $value['name']; ?></dt>
						<dd class="price"><span><?php echo $value['price'];?></span>GF</dd>
					</dl>
					<a href="index.php?m=user&c=goods&a=goods_detail&id=<?php echo $value['id'];?>" class="exchange-btn" data-id="<?php echo $value['id'];  ?>">立即兑换</a>
				</div>
			</li>
			<?php endforeach ?>
			<?php endif ?>


			<!-- <li class="flex">
				<div><img src="<?php echo THEME_PATH;?>images/img1.jpg" alt="" width="165" height="100" class="pro-img"></div>
				<div class="flex-1 pro-info">
					<dl>
						<dt class="name">100元话费充值卡</dt>
						<dd class="price"><span>200</span>GF</dd>
					</dl>
					<a href="" class="exchange-btn">立即兑换</a>
				</div>
			</li> -->
		</ul>
		<p class="no-more">没有更多了</p>
	</div>
	<!-- S 物品列表 -->

	<!-- S footer -->
	<div class="footBox">
		<footer>
			<a href="/index.php?m=user&c=trade&a=index&type=buy">
				<i class="iconfont">&#xe69d;</i>
				<span>交易所</span>
			</a>
			<a href="/index.php?m=user&c=exchange&a=index">
				<i class="iconfont">&#xe69a;</i>
				<span>兑换</span>
			</a>
			<a href="/index.php?m=user&c=goods&a=index" class="cur">
				<i class="iconfont">&#xe69e;</i>
				<span>商城</span>
			</a>
			<a href="/index.php?m=user&c=order&a=index">
				<i class="iconfont">&#xe69b;</i>
				<span>订单</span>
			</a>
			<a href="/index.php?m=user&c=home&a=index">
				<i class="iconfont">&#xe6a3;</i>
				<span>我的</span>
			</a>
		</footer>
	</div>
	<!-- E footer -->
	
	<script src="<?php echo THEME_PATH;?>js/jquery-1.8.3.min.js"></script>
	<script src="<?php echo THEME_PATH;?>js/swiper.min.js"></script>
	<script src="/statics/js/layer/layer.js"></script>
	<script>
			var swiper = new Swiper('.store-swiper', {
		        loop:true,
		        autoplay:3000
		    });
	</script>
	<script>
			var swiper = new Swiper('.nav-slide-swiper', {
				freeMode: true,
				slidesPerView : 4
		    });



			
	</script>
	<script>
		$(function(){
			$(".store-nav-wrap .swiper-slide").click(function(){
				$(this).addClass("cur").siblings().removeClass("cur");
			})
		})
	</script>
</body>
</html>